package com.xspace.android.xafcommon.been;

import android.os.Parcel;
import android.os.Parcelable;

import com.xspace.android.xafcommon.view.tree.bean.TreeNodeId;
import com.xspace.android.xafcommon.view.tree.bean.TreeNodeLabel;
import com.xspace.android.xafcommon.view.tree.bean.TreeNodePid;


public class UnionFriendsBean implements Parcelable {
	public UnionFriendsBean() {
		super();
	}

	public String getPid() {
		return pid;
	}

	public void setPid(String pid) {
		this.pid = pid;
	}

	public boolean isUser() {
		return isUser;
	}

	public void setUser(boolean isUser) {
		this.isUser = isUser;
	}

	public int getStatu() {
		return statu;
	}

	public void setStatu(int statu) {
		this.statu = statu;
	}

	public UnionFriendsBean(String id, String pid, String name) {
		super();
		this.name = name;
		this.id = id;
		this.pid = pid;
	}

	public UnionFriendsBean(String id, String pid, String name, String gid) {
		super();
		this.name = name;
		this.id = id;
		this.pid = pid;
		this.gid = gid;
	}
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPhone() {
		return phone;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getIconUrl() {
		return iconUrl;
	}

	public void setIconUrl(String iconUrl) {
		this.iconUrl = iconUrl;
	}

	@TreeNodeLabel
	private String name;


	private String phone;
	@TreeNodeId
	private String id;
	@TreeNodePid
	private String pid;
	private String gid;
	public String getGid() {
		return gid;
	}

	public void setGid(String gid) {
		this.gid = gid;
	}

	private boolean isUser;
	/** 是否好友 1好友 0非好友 **/
	private int statu;
	private String iconUrl;
	private int isLeaf;
	private String orgName;
	private String orgId;
	public int getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(int isLeaf) {
		this.isLeaf = isLeaf;
	}

	

	public String getOrgId() {
		return orgId;
	}

	public void setOrgId(String orgId) {
		this.orgId = orgId;
	}

	public String getOrgName() {
		return orgName;
	}

	public void setOrgName(String orgName) {
		this.orgName = orgName;
	}

	@Override
	public int describeContents() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(name);
		dest.writeString(phone);
		dest.writeString(id);
		dest.writeString(pid);
		dest.writeByte((byte) (isUser ? 1 : 0));
		dest.writeInt(statu);
		dest.writeString(iconUrl);
		dest.writeInt(isLeaf);
		dest.writeString(orgName);
		dest.writeString(orgId);
	}
	  public static final Creator<UnionFriendsBean> CREATOR = new Creator<UnionFriendsBean>() {
		  
	        @Override  
	        public UnionFriendsBean createFromParcel(Parcel source) {  
	            // TODO Auto-generated method stub  
	            return new UnionFriendsBean(source);  
	        }  
	  
	        @Override  
	        public UnionFriendsBean[] newArray(int size) {  
	            // TODO Auto-generated method stub  
	            return new UnionFriendsBean[size];  
	        }  
	  
	    };  
	  
	    // 从Parcel中读取数据  
	    private UnionFriendsBean(Parcel source) {  
	        name = source.readString();  
	        phone = source.readString();  
	        id = source.readString();  
	        pid = source.readString();  
	        isUser = source.readByte()!=0;  
	        statu = source.readInt();  
	        iconUrl = source.readString();  
	        isLeaf = source.readInt();  
	        orgName = source.readString();  
	        orgId = source.readString();  
	    }  
}
